.class final Lcom/ninesky/a/a/c;
.super Ljava/lang/Thread;


# instance fields
.field private synthetic a:Lcom/ninesky/a/a/b;


# direct methods
.method synthetic constructor <init>(Lcom/ninesky/a/a/b;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/ninesky/a/a/c;-><init>(Lcom/ninesky/a/a/b;B)V

    return-void
.end method

.method private constructor <init>(Lcom/ninesky/a/a/b;B)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 5

    const/4 v0, 0x0

    :try_start_0
    new-instance v1, Lorg/apache/http/client/methods/HttpPost;

    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->a(Lcom/ninesky/a/a/b;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    const-string v2, "Content-Type"

    const-string v3, "application/json"

    invoke-virtual {v1, v2, v3}, Lorg/apache/http/client/methods/HttpPost;->setHeader(Ljava/lang/String;Ljava/lang/String;)V

    const-string v2, "User-Agent"

    sget-object v3, Lcom/ninesky/a/a/f;->a:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Lorg/apache/http/client/methods/HttpPost;->setHeader(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->b(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/ninesky/a/a/d;->g()Lorg/json/JSONObject;

    move-result-object v2

    invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {}, Lcom/ninesky/a/a/b;->b()Z

    move-result v3

    if-eqz v3, :cond_0

    const-string v3, "RequestManager"

    invoke-static {v3, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    new-instance v3, Lorg/apache/http/entity/StringEntity;

    invoke-direct {v3, v2}, Lorg/apache/http/entity/StringEntity;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v3}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    invoke-static {}, Lcom/ninesky/a/a/b;->c()Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :try_start_1
    invoke-virtual {v0, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v1

    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->c(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/e;

    move-result-object v2

    invoke-interface {v1}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v3

    invoke-interface {v3}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v3

    iput v3, v2, Lcom/ninesky/a/a/e;->a:I

    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->c(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/e;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/ninesky/a/a/e;->a(Lorg/apache/http/HttpResponse;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v0

    invoke-interface {v0}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v0}, Lcom/ninesky/a/a/b;->c(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/e;

    move-result-object v0

    iget v0, v0, Lcom/ninesky/a/a/e;->a:I

    const/16 v1, 0xc8

    if-ne v0, v1, :cond_6

    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v0}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v0}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v0

    invoke-interface {v0}, Lcom/ninesky/a/a/a;->a()V

    :cond_2
    :goto_1
    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lcom/ninesky/a/a/b;->a:Z

    return-void

    :catch_0
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    :goto_2
    :try_start_2
    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v2

    if-eqz v2, :cond_3

    iget-object v2, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v2}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v2

    invoke-interface {v2}, Lcom/ninesky/a/a/a;->b()V

    :cond_3
    invoke-static {}, Lcom/ninesky/a/a/b;->b()Z

    move-result v2

    if-eqz v2, :cond_4

    const-string v2, "RequestManager"

    invoke-virtual {v0}, Ljava/lang/Exception;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    :cond_4
    if-eqz v1, :cond_1

    invoke-virtual {v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v0

    invoke-interface {v0}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    goto :goto_0

    :catchall_0
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    :goto_3
    if-eqz v1, :cond_5

    invoke-virtual {v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v1

    invoke-interface {v1}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    :cond_5
    throw v0

    :cond_6
    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v0}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/ninesky/a/a/c;->a:Lcom/ninesky/a/a/b;

    invoke-static {v0}, Lcom/ninesky/a/a/b;->d(Lcom/ninesky/a/a/b;)Lcom/ninesky/a/a/a;

    move-result-object v0

    invoke-interface {v0}, Lcom/ninesky/a/a/a;->b()V

    goto :goto_1

    :catchall_1
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    goto :goto_3

    :catchall_2
    move-exception v0

    goto :goto_3

    :catch_1
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    goto :goto_2
.end method
